package logic.common.team.processes;

import networking.messages.teamMessages.ProcessCreateMessage;
import fileHandling.language.Lang;
import fileHandling.language.interfaces.HUDText;
import logic.common.team.Team;
import logic.ships.carrier.Carrier;

public class CarrierProcess extends TeamProcess {
	
	public CarrierProcess(Team team) {
		super(team, CARRIER_TIME);
	}
	
	@Override
	public void finish() {
		Carrier carrier = team.addNewCarrier();
		carrier.getLocalTranslation().set(team.getMotherShip().getRandomCarrierSpawn(carrier));
		team.getIngameState().addNode(carrier);
	}
	
	@Override
	public Lang getDescription() { return HUDText.Carrier; }
	
	@Override
	public ProcessCreateMessage getProcessCreateMessage() {
		return new ProcessCreateMessage(team.getFraction(), getID(), ProcessType.Carrier);
	}
}